<?php

/**
 * simple_image - Simple image object
 *
 * @package
 * @author Alexis Eric
 * @copyright Copyright (c) 2012 - Erra Prod
 * @version $1.0$
 * @access public
 */
class Std_SimpleActionObject extends Erra_Fields_Base_Object {

    function __construct($objectId, $buildArgs = null) {
        parent::__construct($objectId, $buildArgs);
        $hidden = Erra_Fields_Hidden::create('hidden_field')->setValue($buildArgs);
        $this->addFields($hidden);
        $this->setReadOnly(true);
    }

   public function __form($actionMethod) {
        $res = Erra_System_FormRenderer::startForm($this, $actionMethod);
        $res .= '<a href="#" class="submit">' . $this->getActionName() . '</a>';
        $res .= $this->hidden_field->editInstance();
        $res .= Erra_System_FormRenderer::endForm($this);
        return $res;
    }

}

?>